Configuring Data Collection
Data
collection is configured using the MDW as the target for collected
data. Data collection is performed on every configured server using a
usermode process called dcexec.exe. This standalone process is
responsible for collecting data as defined in a collection set. Two
types of data collections can be defined: System or Custom data
collections. There are three system data collections listed in Table 2.
Table 2. System Data Collections
System Data Collection Set | Description |
---|
Disk Usage | Tracks disk space usage information for data and log files |
Server Activity | Records systemwide performance data such as memory, disk, CPU, and data from the SQL Server operating system |
Query Statistics | Stores queries and execution plans for frequently executed or resource-intensive queries |
In
addition, Administrators can define custom data collections. Custom
data collections can consist of one of four collection sets (see Table 3). Custom collection sets can be useful to establish a complete system baseline.
Table 3. Custom Data Collection Sets
Set | Description |
---|
T-SQL Query | Runs a query defined by an Administrator and stores the result in the MDW |
SQL Trace | Executes a SQL Trace; if configured will upload the trace data to MDW |
Performance Counters | Used to collect System Monitor (Performance Monitor) counters related to SQL Server |
Query Activity | Collects queries and execution plans; collects same data as Query Statistics |
Misconfigured
SQL Traces can harm server performance. SQL Traces can be very resource
intensive when implemented in any form (e.g., SQL Profiler, server side
traces, or custom data collectors). Be cautious when adding events and
filters to the trace and be aware of the overhead to running a trace.
|
Data Collection Caching
Data
collection can be configured in one of two caching modes: either cached
or noncached. Depending on the scenario, a number of factors should be
considered to decide which mode to configure:
Cached
mode: Data collection runs on one schedule and temporarily stores
collected data on the server. Periodically (on a separate schedule) a
different job will upload data from the temporary location to the MDW.
Noncached mode: Data collection and data upload run on the same schedule. Data is collected and directly uploaded to the MDW.
These logins and roles are created on the server carrying out data collection (see Table 4).
Table 4. Data Collection Roles and Permissions
Role | Permissions |
---|
dc_admin | Complete administrative permissions (Create, Read, Update, Delete) |
dc_operator | For Administrator running and configuring Collection Sets (Read, Update access) |
dc_proxy | Required to list and view collector packages |
Management Data Warehouse Reports
The real benefit of the performance data collection feature is reporting (see Figure 7).
The reports present the data available in the MDW and reveal the true
value of the feature. The three system data collections each have a
predefined report available, and other reports can be built as
required. The MDW reports can be useful for establishing a system
baseline, troubleshooting, and capacity planning.
The
performance data collection feature enables DBAs to monitor and report
on system performance, availability, and capacity on a number of
servers with relative ease and simplicity. The Performance Data
Collection solution is flexible and adaptable with custom collections
and reports configurable if required.
Exercise . Performance Data Collector
In this exercise you will configure the management data warehouse and performance data collector for a single server.
Start SQL Server Management Studio.
Expand the Management folder.
Right-click Data Collection and choose Manage Data Warehouse.
Follow the Wizard, selecting Create Management Data Warehouse option.
Create a new database for the MDW.
Follow remaining step to complete the wizard.
Now, configure data collection for an instance:
Start Management Studio on the target instance.
Expand the Management folder.
Right-click and enable Data Collection.
Right-click and choose Manage Data Warehouse.
Follow the wizard selecting Setup data collection.
Specify the name and credentials for the server configured as the MDW in the previous steps.
Follow remaining steps to complete the wizard.
View Management Reports based on the MDW:
Connect to the SQL instance hosting the MDW.
Expand the Management folder.
Right-click on Data Collection.
Choose Reports > Management Data Warehouse > Server Activity History.